package com.example.demo.mapper;
import com.example.demo.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface UserInfoMapper {
//    这里不仅是用来校验,还是用来显式,所以要查询的不仅仅是名称和密码
//    根据用户名查询用户信息
    @Select("select id,user_name,'password',github_url from user where user_name=#{name} and delete_flag=0 ")
    public UserInfo selectUserByName(String name);
//    根据用户ID查询用户信息
    @Select("select id,user_name,'password',github_url from user where id=#{id} and delete_flag=0")
    public UserInfo selectUserById(Integer id);
}
